package trunk.view;

import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JScrollPane;
import javax.swing.JTextArea;
import javax.swing.JTextField;

import trunk.control.UsuarioControlador;

@SuppressWarnings("serial")
public class DetalhesPanel extends JPanel{
    private JTextArea descricaoCampo;
	private JLabel descricaoLabel;
    private JScrollPane jScrollPane1;
    private JTextField localCampo;
    private JLabel localLabel;

	public DetalhesPanel(UsuarioControlador controlador) {
		setBorder(javax.swing.BorderFactory.createEtchedBorder());

		descricaoLabel = new JLabel();
        descricaoLabel.setText("Descrição:");

        descricaoCampo = new JTextArea();
        descricaoCampo.setColumns(20);
        descricaoCampo.setRows(3);
        
        jScrollPane1 = new JScrollPane();
        jScrollPane1.setViewportView(descricaoCampo);

        localLabel = new JLabel();
        localLabel.setText("Local:");
        
        localCampo = new JTextField();

        javax.swing.GroupLayout detalhesPanelLayout = new javax.swing.GroupLayout(this);
        setLayout(detalhesPanelLayout);
        detalhesPanelLayout.setHorizontalGroup(
            detalhesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(detalhesPanelLayout.createSequentialGroup()
                .addGroup(detalhesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(detalhesPanelLayout.createSequentialGroup()
                        .addGap(44, 44, 44)
                        .addComponent(localLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(localCampo, javax.swing.GroupLayout.DEFAULT_SIZE, 310, Short.MAX_VALUE))
                    .addGroup(detalhesPanelLayout.createSequentialGroup()
                        .addContainerGap()
                        .addComponent(descricaoLabel)
                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                        .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 310, Short.MAX_VALUE)))
                .addContainerGap())
        );
        detalhesPanelLayout.setVerticalGroup(
            detalhesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(detalhesPanelLayout.createSequentialGroup()
                .addContainerGap()
                .addGroup(detalhesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(localLabel)
                    .addComponent(localCampo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                .addGroup(detalhesPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 51, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(descricaoLabel))
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
        );
	}

    public void setDescricao(String descricao) {
		this.descricaoCampo.setText(descricao);
	}

	public void setLocal(String local) {
		this.localCampo.setText(local);
	}

	public JTextArea getDescricaoCampo() {
		return descricaoCampo;
	}

	public JTextField getLocalCampo() {
		return localCampo;
	}
}
